#include<stdio.h>
int main()
{
	int n,i,j=1,m;
	scanf("%d",&n);
	m=n;
	for(i=1;i<=n;i++)
	{
	do
	{
		if(j<=9)
		printf("0%d",j);
		else
		printf("%d",j);
		j++;	
	}while(j<=m);
	m=m+n-i;
	printf("\n");
	}
    return 0;
}

